package com.lgl.cli;

import com.lgl.cli.command.ConfigCommand;
import com.lgl.cli.command.GenerateCommand;
import com.lgl.cli.command.ListCommand;
import picocli.CommandLine;
import picocli.CommandLine.Command;

import java.util.concurrent.Callable;

/**
 * @author
 * @verison 1.0
 */

@Command(name = "executor", mixinStandardHelpOptions = true)
public class CommandExecutor implements Runnable {

    public static final CommandLine commandLine;

    static {
        commandLine = new CommandLine(new CommandExecutor())
                .addSubcommand(new GenerateCommand())
                .addSubcommand(new ListCommand())
                .addSubcommand(new ConfigCommand());
    }

    @Override
    public void run() {
        System.out.println("输入参数");
    }

    public static void main(String[] args) {

    }

    public Integer doExecute(String[] args) {
        return commandLine.execute(args);
    }
}
